package com.study;

/*2.使用方法重载计算两个整数的和，三个整数的和，两个小数的和并测试"（提交的代码要求可以编译通过）*/
public class Demo2 {
    public static void main(String[] args) {
        getSum(1, 2);
        getSum(1, 2, 3);
        getSum(1.2, 2.3);
    }

    public static void getSum(int iNum1, int iNum2) {
        System.out.println("两个整数的和：" + (iNum1 + iNum2));
    }

    public static void getSum(int iNum1, int iNum2, int iNum3) {
        System.out.println("三个整数的和：" + (iNum1 + iNum2 + iNum3));
    }

    public static void getSum(double dNum1, double dNum2) {
        System.out.println("两个小数的和：" + (dNum1 + dNum2));
    }
}
